首页

欢迎

 

Welcome

欢迎来到这里, 这是一个学习数学、讨论数学的网站.

转到问题

请输入问题号, 例如: 2512

IMAGINE, THINK, and DO
How to be a scientist, mathematician and an engineer, all in one?
--- S. Muthu Muthukrishnan

Local Notes

Local Notes 是一款 Windows 下的笔记系统.

Local Notes 下载

Sowya

Sowya 是一款运行于 Windows 下的计算软件.

详情

下载 Sowya.7z (包含最新版的 Sowya.exe and SowyaApp.exe)


注: 自 v0.550 开始, Calculator 更名为 Sowya. [Sowya] 是吴语中数学的发音, 可在 cn.bing.com/translator 中输入 Sowya, 听其英语发音或法语发音.





注册

欢迎注册, 您的参与将会促进数学交流. 注册

在注册之前, 或许您想先试用一下. 测试帐号: usertest 密码: usertest. 请不要更改密码.


我制作的 slides

Problem

随机显示问题

Problèmes d'affichage aléatoires

软件 >> PostgreSQL
Questions in category: PostgreSQL (PostgreSQL).

PostgreSQL 中的基本操作

Posted by haifeng on 2014-10-13 17:59:16 last update 2014-12-01 11:28:57 | Answers (0)


与 MySQL 进行对比

mysql: SHOW TABLES
postgresql: \d
postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';

mysql: SHOW DATABASES
postgresql: \l
postgresql: SELECT datname FROM pg_database;

mysql: SHOW COLUMNS
postgresql: \d table
postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table';

mysql: DESCRIBE TABLE
postgresql: \d+ table
postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table';

 


更改表的结构使用 ALTER TABLE 语句

1. 增加一个名为 avatar 的属性 (avatar: 头像)

ALTER TABLE userinfo ADD COLUMN avatar varchar(255);

2. 删除刚才建的属性 avatar

ALTER TABLE userinfo DROP COLUMN avatar;


http://www.linuxscrew.com/2009/07/03/postgresql-show-tables-show-databases-show-columns/

http://blog.163.com/ruihuadesunny@126/blog/static/39026191200952231259710/